(library (display-utils)
  (export display-list)
  (import
    (except (rnrs base) let-values)
    (only (guile) lambda* λ
          current-output-port
          simple-format)
    (srfi srfi-1)))


(define display-list
  (lambda* (lst #:optional (output-port (current-output-port)) #:key (sep "\n"))
    (let next ([rem-items lst])
      (cond
       [(null? rem-items)
        (simple-format output-port "~a" "")]
       [else
        (simple-format output-port "~a~a" (first rem-items) sep)
        (next (cdr rem-items))]))))
